import {
  getMessagePage
} from "@/api/index"

const state = {
  messageList: []
}

const mutations = {
  getMessagePage(state, val) {
    state.messageList = val
  }
}

const actions = {
  async getMessagePage({
    commit
  }, val) {
    let mes = await getMessagePage(val)
    console.log(mes, 'xxxxxxxxxxxxxxxxxxxxxx')
    commit('getMessagePage', mes.dataList)
    console.log(mes.dataList.length,'长度')
  }
}

const modules = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  modules
}
